<#import "PojoMacro.ftl" as pojo>
package ${class.package.name?substring(0, class.package.name?last_index_of("."))}.query;

import com.fzy.core.QueryForm;
<#assign hasDate=false><#t/>
<#list plugin.getClassProperties(class) as property><#t/>
	<#if property.name != "status" && property.name != "createdDate" && property.name != "createdUser" && property.name != "updatedDate" && property.name != "updatedUser"><#t/>
		<#if property.entity.getTagByName("hibernate.custom")?? ><#t/>
			<#assign customTag=property.entity.getTagByName("hibernate.custom")><#t/>
			<#if ((customTag.query!false) && (property.entity.propertyType = "java.util.Date")) ><#t/>
				<#assign hasDate=true>
			</#if><#t/>
		</#if><#t/>
	</#if><#t/>
</#list><#t/>
<#if hasDate ><#t/>
import java.util.Date;
</#if><#t/>

public class ${class.name}Query extends QueryForm {
<#list plugin.getClassProperties(class) as property><#t/>
	<#if property.name != "status" && property.name != "createdDate" && property.name != "createdUser" && property.name != "updatedDate" && property.name != "updatedUser"><#t/>
		<#if property.entity.getTagByName("hibernate.custom")?? ><#t/>
			<#assign customTag=property.entity.getTagByName("hibernate.custom")><#t/>
			<#if customTag.query!false ><#t>
				<@pojo.field type=property.entity.propertyType name=property.name />
			</#if><#t/>
		</#if><#t/>
	</#if><#t/>
</#list><#t/>

<#list plugin.getClassProperties(class) as property><#t/>
	<#if property.name != "status" && property.name != "createdDate" && property.name != "createdUser" && property.name != "updatedDate" && property.name != "updatedUser"><#t/>
		<#if property.entity.getTagByName("hibernate.custom")?? ><#t/>
			<#assign customTag=property.entity.getTagByName("hibernate.custom")><#t/>
			<#if customTag.query!false ><#t>
				<@pojo.method type=property.entity.propertyType name=property.name />
			</#if><#t/>
		</#if><#t/>
	</#if><#t/>
</#list><#t/>

}
